package com.hpf.gupao.pattern.factory.simple;

/**
 * @description:
 * @datetime: 2021/5/16 16:11
 * @author: huangpengfei
 */
public class CourseFactory {

    public static ICourse create(Class<? extends ICourse> clazz){
        try{
            if(null != clazz){
                return clazz.newInstance();
            }
        }catch(Exception e){
            e.printStackTrace();
        }
        return null;
    }
}
